<html xmlns:th="http://www.thymeleaf.org">
<head>

    <link th:href="@{https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css}" rel="stylesheet"/>

    <style>
        table {
            table-layout: fixed;
        }

        td {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
    </style>
</head>

<body>
<a th:href="@{/project/{projectId}/script/input(projectId=${projectId})}"> add</a>
<h1 th:text="${message}" style="color: red;"></h1>
<h1>脚本 列表</h1>
<h1>项目名称：<span th:text="${projectName}"></span></h1>
<h1>总耗时：<span th:text="${totalElapsedTime}"></span>（毫秒）</h1>
<h1>总计<span th:text="${scriptCount}"/>个，失败了<span th:text="${failScriptCount}"/>个</h1>
<div>
    <table class="table table-bordered">
        <thead>
        <tr>
            <td>
                script
            </td>
            <td>
                name
            </td>
            <td>
                desc
            </td>
            <td>
                sn
            </td>
            <td>
                最近一次执行结果
            </td>
            <td>
                最近一次执行时间
            </td>
            <td>
                执行耗时（毫秒）
            </td>
            <td>
                执行次数统计
            </td>
            <td>
                操作
            </td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="script : ${scripts}">
            <td th:text="${script.script}"></td>
            <td th:text="${script.name}"></td>
            <td th:text="${script.description}"></td>
            <td th:text="${script.sn}"></td>
            <td th:text="${script.lastExecuteStatus}"></td>
            <td th:text="${script.lastExecuteTime}"></td>
            <td th:text="${script.lastElapsedTime}"></td>
            <td th:text="${script.executeCount}"></td>
            <td>
                <a th:href="@{/project/{projectId}/script/execute/{id}(id=${script.id},projectId=${projectId})}"
                >执行脚本</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>
